package com.sikaryofficial.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.backend.domain.dto.req.prize.PrizeListReq;
import com.sikaryofficial.backend.domain.dto.req.productactivity.ActivityListReq;
import com.sikaryofficial.backend.domain.dto.req.productactivity.ActivityRecommendListReq;
import com.sikaryofficial.backend.domain.dto.resp.prize.PrizeDTO;
import com.sikaryofficial.backend.domain.dto.resp.productactivity.ActivityDTO;
import com.sikaryofficial.backend.domain.entity.Prize;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 奖品Mapper接口
 *
 * @author qinjinyuan
 * @date 2023-11-02
 */
public interface PrizeMapper extends BaseMapper<Prize> {
    /**
     * 后台活动分页列表
     * @param customerPage
     * @param req
     * @return
     */
    IPage<ActivityDTO> getBackendActivityList(Page<ActivityDTO> customerPage, @Param("req") ActivityListReq req);
    /**
     * 获取活动列表
     *
     * @param customerPage
     * @return
     */
    IPage<ActivityDTO> getActivityByPage(Page<ActivityDTO> customerPage, @Param("req") ActivityRecommendListReq req);
    /**
     * 品牌专栏-活动列表查询
     *
     * @param customerPage
     * @param tenantId
     * @return
     */
    IPage<ActivityDTO> getActivityListByBrandSpecial(Page<ActivityDTO> customerPage,  @Param("tenantId") Integer tenantId);

    /**
     * 获取活动详情
     *
     * @param activityId
     * @return
     */
    ActivityDTO getActivityDetail(@Param("activityId") Long activityId);

    int getActivityCountByTenantId(@Param("tenantId") Integer tenantId);

    IPage<PrizeDTO> selectPrizeByPage(Page<PrizeDTO> customerPage, @Param("req")PrizeListReq req, @Param("excludePrizeIds")List<Long> excludePrizeIds);
}
